package com.wyw.function.learning.demo10;

import com.wyw.function.learning.common.Strategy;

/**
 * @Title   策略模式重构测试
 * @Description     虽然方便，但是使用Lambda不容易查错，一旦异常很难定位问题
 * @Author Mr Wu yewen.wu.china@gmail.com
 * Update History:
 * Author        Time            Content
 */
public class DemoClient28 {

    private static final String s = "SSS";

//    public static void main(String[] args) {
//        StrategyA strategyA = new StrategyA();
//        StrategyB strategyB = new StrategyB();
//        strategyA.executor(s);
//        strategyB.executor(s);
//    }

    static Strategy strategyA = s -> System.out.println(s);
    static Strategy strategyB = s -> System.out.println(s);

    public static void main(String[] args) {
        strategyA.executor(s);
        strategyB.executor(s);
    }

}
